import { createApp } from 'vue'
import App from './App.vue'
import { Button } from 'vant'
import { Cell, CellGroup } from 'vant'
import { Image as VanImage } from 'vant'
import { NavBar } from 'vant'
import { Switch } from 'vant'
import { Sticky } from 'vant'
import { Icon } from 'vant'
import { Popup } from 'vant'
import router from './router'
import api from './api/api'
import asyncTool from './libs/asyncTool'
import "./globleCss.css"

const app = createApp(App)
app.use(router)
app.use(Button)
app.use(Switch)
app.use(Sticky)
app.use(Icon)
app.use(Cell)
app.use(CellGroup)
app.use(VanImage)
app.use(NavBar)
app.use(Popup)
app.config.globalProperties.$api = api
app.config.globalProperties.$getAc = () => {
  return new asyncTool()
}
app.mount('#app')

window.$app = app
console.info('app.config.globalProperties', app.config.globalProperties)
window.$globalProperties = app.config.globalProperties
window.bookList = {}
